home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula 2
/
Nebula Two.iso
/
SourceCode
/
GameKit
/
Examples
/
PacMan
/
FruitView.h
< prev
next >
Wrap
Text File
|
1995-06-12
|
675b
|
27 lines
// This draw x fruits, depending on the level we're at. Used in the
// "Fruit Basket" window.
#import <appkit/appkit.h>
#define FRUIT_SIZE 16 // 32 pixels square
#define FRUIT_PER_ROW 5 // per row on base image
#define FRUIT_LEVELS 16 // # levels with fruit specified;
// after that, we use NeXTcubes.
extern int fruits[FRUIT_LEVELS + 1];
@interface FruitView:View
{
id fruit; // image with all the fruit in it.
int lastLevel; // highest level reached by player.
}
- initFrame:(const NXRect *)frm; // initialize instance
- drawSelf:(NXRect *)rects :(int)rectCount; // standard rendering method
- showLevel:(int)num; // draw all fruits up to level
@end